﻿using System.Drawing;
using System.Runtime.InteropServices;

namespace SilverlightViewport.Common.Interop
{
    [StructLayout(LayoutKind.Sequential)]
    public struct RECTT
    {
        public long left;
        public long top;
        public long right;
        public long bottom;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct RECT
    {
        public int left;
        public int top;
        public int right;
        public int bottom;

        public static RECT FromRectangle(Rectangle rectangle)
        {
            RECT r = new RECT();
            r.left = rectangle.Left;
            r.top = rectangle.Top;
            r.right = rectangle.Right;
            r.bottom = rectangle.Bottom;
            return r;
        }
    }
}
